#ifndef ROBOT_H
#define ROBOT_H

#include "Engine.hpp"
#include "Event.hpp"
#include "SensorPoller.hpp"
#include "State.hpp"

class Robot
{
public:
	static Robot& getInstance();

	void handleEvent(Event& event);
	void handleEmergencyStopActivatedEvent();

	void changeState(State& newState);

	State& getState();
	Engine& getEngine();

	void init();
	void restart();

private:
	Robot(State& aStartState);
	Robot(Robot const&); // Not implemented
	void operator=(Robot const&); // Not implemented

	Engine engine;
	State& currentState;
	SensorPoller sensorPoller;
};
#endif
